% Test the function makeppft filter.
%
% Yoel Shkolnisky, December 2010.
precond=0;
explim=12;
for n=2.^(1:explim)
	precision='double';
	if n > 2^(explim-1)
		precision='single';
	end
    tic;
    H1=makePPFTFilter2D(n,precision);
    t1=toc;
    
    tic;
    filename=sprintf('filters%sH2Dfilter%dprecond%dprecision%s.dat',filesep,n,precond,precision);
    if exist(filename,'file')
        H2=load2DHFilter(filename,precision);
    else
        H2=save2DHFilter(filename,n,precond,precision);
    end
    t2 = toc;
    
    H3=H1.filter(2:2*n,2:2*n);
    
    reportTestResult(n,(norm(H2.filter(:)-H3(:))./norm(H2.filter(:))),t1/t2,precision);    
end

